home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 47 / MOBICLIC 47.ISO / mac / DATA / DemoAtlas / demo.cst / 00005_Script_moteurs < prev    next >
Text File  |  2002-07-23  |  2KB  |  75 lines

  1. -- affiche un Θlastique entre un objet origine et un objet cible
  2.  
  3. global traitLiaison, volumeOn, menuOuvert
  4.  
  5. -- test clic sur Θcran
  6. on testClic
  7.   if menuOuvert=0 and volumeOn<>1 then
  8.     return 1
  9.   else
  10.     return 0
  11.   end if
  12. end
  13.  
  14. -- impression de l'Θcran
  15. on imprime
  16.  prevue = the optionDown
  17.   doc = xtra("PrintOMatic").new()
  18.   if not objectP(doc) then exit
  19.   setPrintableMargins doc
  20.   if doPageSetUp (doc) = true then
  21.     newPage doc
  22.     H = getPageWidth(doc)
  23.     V = getPageHeight(doc)
  24.     X =(H-640)/2
  25.     Y =(V-480)/2
  26.     if H>640 then
  27.       drawStagePicture doc, Point(X,Y),Rect(1,1,640,480),true
  28.     else
  29.       drawStagePicture doc, rect(1,1,H,V),Rect(1,1,640,480),true
  30.     end if
  31.     if doJobSetup (doc) = TRUE then
  32.       if prevue = 1 then
  33.         printPreview doc
  34.       else
  35.         setProgressMsg doc , "Impression d'un Θcran Mobiclic en cours... "
  36.         print doc
  37.       end if
  38.     end if
  39.   end if
  40.   doc = 0
  41. end imprime
  42.  
  43. -- impression d'un acteur
  44. on imprimeActeur n,c
  45.   if the paramCount=1 then
  46.     c=1
  47.   end if
  48.   prevue = the optionDown
  49.   if prevue=1 then
  50.     printPreview member n of castLib c
  51.   else
  52.     print member n of castLib c
  53.   end if
  54. end imprimeActeur
  55.  
  56. -- temporisation (en secondes)
  57. on temporise t
  58.   t= t*60.0
  59.   d = the timer
  60.   repeat while the timer - d < t
  61.   end repeat
  62. end temporise
  63.  
  64. -- conversion d'un chemin d'accΦs de Mac α Dos
  65. on nomDos nom
  66.   if the machineType = 256 then
  67.     repeat with i=1 to the number of chars of nom
  68.       if char i of nom = ":" then
  69.         put "\" into char i of nom
  70.       end if
  71.     end repeat
  72.   end if
  73.   return nom
  74. end nomDos
  75.